package com.health.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.health.entity.Appointment;
import com.health.entity.pojo.dto.QueryAppointPhysicalDTO;
import com.health.entity.pojo.dto.QueryAppointRegisterDTO;
import com.health.entity.pojo.vo.AppointPhysicalVO;
import com.health.entity.pojo.vo.ApponitmentRegisterVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

import java.util.List;

/**
 * <p>
 * 预约表 Mapper 接口
 * </p>
 *
 * @author konglz
 * @since 2023-04-16
 */
@Mapper
public interface AppointmentMapper extends BaseMapper<Appointment> {

    IPage<ApponitmentRegisterVO> listPageRegisterAppointInfo(Page<ApponitmentRegisterVO> page, @Param("queryAppointRegisterDTO") QueryAppointRegisterDTO queryAppointRegisterDTO);

    IPage<ApponitmentRegisterVO> listPageRegisterAppointByDoctor(IPage<ApponitmentRegisterVO> iPage, @Param("doctorId") Integer doctorId, @Param("workTime") String workTime, @Param("appointDate") String appointDate);


    /**
     *  预约查询体检 mapper 接口
     *  @author yu
     *  @since 2023-04-20
     */
    //预约查询体检 数据列表获取
    IPage<AppointPhysicalVO> listAllPhysicals(Page<AppointPhysicalVO> page,@Param("dto") QueryAppointPhysicalDTO dto);

    //预约查询体检 预约明细 基本信息
    List<AppointPhysicalVO> getPhysicalById(@Param("id") Integer id);

    //预约查询体检 预约明细
    IPage<AppointPhysicalVO> getPhysicalOrderById(Page<AppointPhysicalVO> page, @Param("id") Integer id);

}
